package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import lombok.Data;

/**
 * @author lwj
 * @date 2025/5/19
 */
    
/**
 * 到点订单表
 */
@Data
@TableName(value = "t_to_shop_order")
public class ToShopOrder {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 店铺编码
     */
    @TableField(value = "shop_code")
    private String shopCode;

    /**
     * 店铺名字
     */
    @TableField(value = "shop_name")
    private String shopName;

    /**
     * 订单id
     */
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 订单编号
     */
    @TableField(value = "order_no")
    private String orderNo;

    /**
     * 支付链接
     */
    @TableField(value = "pay_url")
    private String payUrl;

    /**
     * 用户id冗余
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 是否支付冗余
     */
    @TableField(value = "is_pay")
    private Integer isPay;

    /**
     * 订单状态冗余
     */
    @TableField(value = "order_status")
    private Integer orderStatus;

    /**
     * 取消状态冗余
     */
    @TableField(value = "is_cancel")
    private Integer isCancel;

    /**
     * 幺币支付返款比列
     */
    @TableField(value = "refund_ys_ratio")
    private String refundYsRatio = "0";

    /**
     * wx支付返款比列
     */
    @TableField(value = "refund_wx_ratio")
    private String refundWxRatio = "0";

    /**
     * 创建员工id
     */
    @TableField(value = "emp_id")
    private Long empId;

    /**
     * 创建员工名字
     */
    @TableField(value = "emp_name")
    private String empName;

    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;
}